/************************************************************************/
// Copyright (C) 2016, han_gangbiao. All rights reserved.
// Use of this source code is governed by a GPL-v2 license that can be found in the License file.
// 
// [Time]:      2016-1-4 21:53:17
// [Author]:    han_gangbiao [http://my.oschina.net/jackhen]
// [Info]:      
/************************************************************************/

#include "xguard.h"

BEG_NS_SMART

guard_t::guard_t(mutex_t* mtx) : m_pMutex(mtx)
{
    m_pMutex->lock();
}

guard_t::~guard_t()
{
    m_pMutex->unlock();
}

END_NS_SMART
